/*
 * ImgPolozkaShFot.java
 *
 * Created on 23. listopad 2002, 15:26
 */

package cz.masa.FotoCAT;

import java.text.*;
/**
 *
 * @author  Jiri Masnik
 */
public class ImgPolozkaShBas extends javax.swing.JPanel {
    private fcaImage fcaIm;

    public ImgPolozkaShBas(fcaImage im) {
        this.fcaIm = im;
        initComponents();
        
        jLabel1.setText("Filename: " + fcaIm.getFilename());
        jLabel4.setText("Filesize: " + FotoCATutil.getSizeString(fcaIm.getFileSize()));
        jLabel6.setText("Resolution: " + fcaIm.getResolutionStr());
        jLabel7.setText("Film name: " + fcaIm.getFcaDirectory().getName());
        jLabel8.setText("Store place: " + fcaIm.getFcaDirectory().getFcaStore().getName() + " (" + fcaIm.getFcaDirectory().getFcaStore().getTypeStr() + ")");
        
        SimpleDateFormat sfd = new SimpleDateFormat("d. M. yyyy");
        SimpleDateFormat sft = new SimpleDateFormat("HH:mm:ss");

        String datum = "N/A";
        if(fcaIm.getDate() != null) datum = sfd.format(fcaIm.getDate());
        String cas = "N/A";
        if(fcaIm.getTime() != null) cas = sft.format(fcaIm.getTime());
        jLabel2.setText("Path: " + ImgOper.getFullPath(im.getId(), false));
        jLabel3.setText("Date: " + datum);
        jLabel5.setText("Time: " + cas);
    }    
    
    private void initComponents() {//GEN-BEGIN:initComponents
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();

        setLayout(new java.awt.GridLayout(0, 2, 2, 2));

        setBorder(new javax.swing.border.EmptyBorder(new java.awt.Insets(5, 5, 5, 5)));
        add(jLabel1);

        add(jLabel2);

        add(jLabel3);

        add(jLabel4);

        add(jLabel5);

        add(jLabel6);

        add(jLabel7);

        add(jLabel8);

    }//GEN-END:initComponents
    
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    // End of variables declaration//GEN-END:variables
    
}
